﻿
namespace LS.Nc6.Application.System
{ 
   public interface ISysConfigurationService : IBaseInterface<SysConfigurationEntity> { 
        /// <summary>
        /// 检查业务码是否可用
        /// </summary>
        /// <param name="id">id</param>
        /// <param name="bm">编码</param>
        /// <returns></returns>
        Task<bool> ExistsBm(string id, string bm);
        /// <summary>
        /// 根据code获得配置信息
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        Task<SysConfigurationEntity> GetByCode(string code);
        /// <summary>
        /// 根据code获得配置值
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        Task<string> GetValueByCode(string code);

        /// <summary>
        /// 自动获取订单号
        /// </summary>
        /// <param name="billName">单据类型</param>
        /// <param name="prefixes">前缀字符</param>
        /// <param name="isContinuous">是否连续号码 0否 1=是</param>
        /// <param name="billLen">单号长度</param>
        /// <returns></returns>
        Task<string> GetBillNumber(string billName,string prefixes,int isContinuous=0, int billLen=6);

    }
}
